<div ng-include src="'tpl/public/header.html'"></div> 
<div ng-include src="'tpl/public/header.html'"></div> 
<div class="contents">
  <ol class="breadcrumb">
    <li><a href="#/index/panel">首页</a></li>
    <li class="active">私募订单列表</li>
  </ol>
<div ng-click="changeShow()" id="changecss" class="markyanse" style="filter: glow(color=black,strength=3); height:10px;  padding:1px;float:right;" >消息({{orderList.length}})</div>

  <form class="form-inline search-box" role="form" ng-submit="search()" novalidate>
    <div class="form-group">
      <select class="form-control" placeholder="订单状态" ng-model="searchMap.status" ng-options="m.value as m.text for m in dictMap.simuOrderStatusModel" ><option value="">订单状态</option>
      </select> 
    </div>
    <div class="form-group">
      <select has-auth where="btn" who="ORDER_MANAGER_USER_LIST" class="form-control" placeholder="订单跟进人" ng-model="searchMap.systemUserId" ng-options="u.userId as u.username for u in orderManagerUserList" ><option value="">--订单跟进人--</option></select> 
    </div>
    <button type="submit" class="btn btn-default">查询</button>
    <button class="btn btn-primary" style="margin-left:10px;" ng-click="orderDoOrder(1);" has-auth where="btn" who="ORDER_MANAGER_USER_LIST">分配</button>
    <button class="btn btn-primary" style="margin-left:10px;" ng-click="orderDoOrder(0);" has-auth where="btn" who="ORDER_MANAGER_USER_LIST">收回</button>
  </form>
  <table class="table table-striped table-hover">
    <thead>
      <tr>
        <th width="30"><input type="checkbox" id="chkAllOrderList" ng-click="chkAllOrderList();" /></th>
        <th width="50">订单ID</th>
        <th>基金简称</th>
        <th width="90">订单金额</th>
        <th width="100">客户姓名</th>
        <th width="100">客户手机号</th>
        <th width="100">理财师</th>
        <th width="120">理财师手机号</th>
        <th width="50">订单跟进人</th>
        <th width="50">状态</th>
        <th width="60">预约时间</th>
        <th width="60">处理时间</th>
        <th width="115">操作</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="item in list">
        <td>
          <input type="checkbox" name="chkOrderList" value="{{item.orderTmp.id}}" faid="{{item.orderTmp.faId}}" omu="{{item.orderTmp.orderManagerUser}}" />
        </td>
        <td>{{item.orderTmp.id}}</td>
        <td><a href="#/simu/view?id={{item.product.id}}">{{item.product.jjmc}}</a></td>
        <td>{{item.orderTmp.oAmount | moneyRender}}</td>
        <td>{{item.orderTmp.oClientName}}</td>
        <td>{{item.orderTmp.oClientMobile}}</td>
        <td>{{item.faInfo.faShowName}}</td>
        <td>{{item.faInfo.uMobile}}</td>
        <td>{{item.orderTmp.orderManagerUser}}</td>
        <td class="withdraw-status-{{item.orderTmp.status}}">{{item.orderTmp.status | simuOrderStatusRender}}</td>
        <td>{{item.orderTmp.createDate | date:'yyyy-MM-dd HH:mm'}}</td>
        <td>{{item.orderTmp.updateDate | date:'yyyy-MM-dd HH:mm'}}</td>
        <td class="optd">
          <a href="#/simu/order/view?id={{item.orderTmp.id}}" has-auth where="btn" who="SIMU_ORDER_EDIT">详情</a>
          <a ng-click="process(item.orderTmp.id)" has-auth where="btn" who="SIMU_ORDER_EDIT" class="cur-p">标为已处理</a>
          <a ng-if="item.orderTmp.status!='03'" href="#/simu/order/phoUpload?pId={{item.product.id}}&oId={{item.orderTmp.id}}&pType=05&oType=03" has-auth where="btn" who="SIMU_ORDER_EDIT" class="cur-p">资料上传</a>
        </td>
      </tr>
    <tbody>
  </table>

	<div class="pager-box" ng-include src="'tpl/public/pager.html'" ng-show="list.length > 0"></div>
</div> 

<div class="layer-box" ng-show="isShowOrderManagerLayer">
  <div class="layer-bg"></div>
  <div class="layer-con " style="padding:10px 20px;">
    <span class="icons-close" title="关闭" ng-click="isShowOrderManagerLayer = false;">X</span>
    <div class="layer-title">
      <label ng-if="t == '1'">分配！请确认操作！</label>
      <label ng-if="t == '0'">回收！请确认操作！</label>
    </div>
    <div class="con-wrap">
      <div class="form-group" >
        <table class="order-f-h" style="width:100%">
          <tr ng-if="t == '1'">
            <td colspan="2">
              <select class="form-control" ng-model="managerOrder.systemUserId" ng-options="u.userId as u.username for u in orderManagerUserList2">
              </select>
            </td>
          </tr>
          <tr>
            <td colspan="2" style="text-align:left;font-weight: bold;">共选择{{chooseOrderIdCount}}条订单！</td>
          </tr>
          <tr>
            <td><a class="btn btn-block btn-primary" ng-click="fenpeiOrHuishou(t);">确定</a></td>
            <td><a class="btn btn-block btn-primary" ng-click="isShowOrderManagerLayer = false;">取消</a></td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</div> 

<div class="layer-box" ng-show="isShowOrder"  >
  <div class="layer-bg"></div>

  <div class="layer-con " style="padding:10px 20px; width:440px;height:335px;">
    <span class="icons-close" title="关闭" ng-click="isShowOrder = false;">X</span>
    <div class="layer-title">
      <label >订单情况</label>
    </div>
    <div style="padding:10px 20px; width:400px;height:300px;overflow: scroll">
    
    <div class="con-wrap">
      <div class="form-group" >

<div ng-if="orderList==''">
<table class="order-f-h ziliaoshangchuan" style="width:100%">
          <tr >
            <td >
              序号
            </td>
            <td >
              订单号
            </td>
            <td >
              当前状态
            </td>
            <td >
              停留天数
            </td>
          </tr>

          
        </table>

  无订单记录
</div>
<div ng-if="orderList.length>0">
        <table class="order-f-h ziliaoshangchuan" style="width:100%">
          <tr >
            <td >
              序号
            </td>
            <td >
              订单号
            </td>
            <td >
              当前状态
            </td>
            <td >
              停留天数
            </td>
          </tr>
          <tr ng-repeat="order in orderList">
            <td >
            {{$index+1}}
            </td>
            <td >
              {{order.o_code}}
            </td>
            <td >
              {{order.o_status}}
            </td>
            <td >
              {{order.dateDiffnow}}
            </td>
            
          </tr>
          
        </table>
        <div >
      </div>
    </div>
    </div>
  </div>
</div> 

